#ifndef _BLOCKBREAKER_RENDER_RENDERERDX9_H__
#define _BLOCKBREAKER_RENDER_RENDERERDX9_H__

// DirectX9
#include <d3d9.h>
#include <D3dx9core.h>

#include <Render\Include\Renderer.h>
#include <Render/Include/IWinWindow.h>

class RendererDX9 : public Renderer
{
private:
    /// \brief directX9 device pointer
    LPDIRECT3DDEVICE9 p_device;

    /// \brief font to render text
    LPD3DXFONT font; 
    
public:
    RendererDX9(IWinWindow* window);
    virtual ~RendererDX9();

    virtual void renderScene(Scene* scene, Paddle* local_player_paddle);
    virtual void renderBlack();

private:
    void createCubeRenderObject();
    void createBallRenderObject();

    void configViewPoint(Scene* scene, Paddle* local_player_paddle);
    void renderSceneWalls(Scene* scene);
    void renderPaddle(Paddle* paddle);
    void renderBall(Ball* ball);
    void renderBlock(Block* block);

    void drawText();
};

#endif // _BLOCKBREAKER_RENDER_RENDERERDX9_H__